﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true"
    CodeFile="EjecucionPresupuestalPlanAccionEje.aspx.cs" Inherits="EjecucionPresupuestalPlanAccionEje" %>

<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dxcp" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dxrp" %>
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<%@ Register TagPrefix="cc1" Namespace="UsrControls" Assembly="UsrControls" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3.Export, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
         function ShowHideCustomizationWindow() 
    {
        if(ctl00_ContentPlaceHolder1_ASPxGridViewDemo.IsCustomizationWindowVisible())
            ctl00_ContentPlaceHolder1_ASPxGridViewDemo.HideCustomizationWindow();
        else ctl00_ContentPlaceHolder1_ASPxGridViewDemo.ShowCustomizationWindow();        
            UpdateCustomizationWindowValue();
            
    }
    
      function UpdateCustomizationWindowValue() 
    {
    
        var element = document.getElementById("btnCustWindow");
        if(element == null) return;
        element.value = (ctl00_ContentPlaceHolder1_ASPxGridViewDemo.IsCustomizationWindowVisible() ? "Esconder" : "Mostrar") + " Ventana Manual";
    }
    
    function confirmEdit()
    {
    var counter = ctl00_ContentPlaceHolder1_ASPxGridViewDemo.GetSelectedRowCount();
    if (counter > 1)
        {
        counter = 0;
            alert("Debe seleccionar un solo registro");
            return(false);
        }
        else if (counter == 1)
        {
        counter = 0;
            return(true);
        }
        else if (counter == 0)
        {
        counter = 0;
        alert("Debe seleccionar al  menos un registro");
            return(false);
        }
    }
    
    
     function confirmEditEP()
    {
    var counter = ctl00_ContentPlaceHolder1_gidvAccionEpeDev.GetSelectedRowCount();
    if (counter > 1)
        {
        counter = 0;
            alert("Debe seleccionar un solo registro");
            return(false);
        }
        else if (counter == 1)
        {
        counter = 0;
            return(true);
        }
        else if (counter == 0)
        {
        counter = 0;
        alert("Debe seleccionar al  menos un registro");
            return(false);
        }
    }
	function actualizarTotales()
	{
	  Anthem_InvokePageMethod(
            'CargarTotales',
            [],
            function(result) {}
        );	    
	}
	
	function ApplyFilter(dde, dateFrom, dateTo)
     {        
        var d1 = dateFrom.GetText();
        var d2 = dateTo.GetText();
        if (d1 == "" || d2 == "")
            return;
        dde.SetText(d1 + "|" + d2);
        ctl00_ContentPlaceHolder1_gidvAccionEpeDev.AutoFilterByColumn("FAE_FECHA_CDP", dde.GetText());
     }
    
    function OnDropDown(s, dateFrom, dateTo)
    {
        var str = s.GetText();
        if (str == "")
        {
            // default date (1950-1961 for demo)     
            dateFrom.SetDate(new Date(2010, 0, 1));
            dateTo.SetDate(new Date(2010, 11, 31));
            return;
        }
        var d = str.split("|");
        dateFrom.SetText(d[0]);
        dateTo.SetText(d[1]);        
    }
    </script>
    <h1 class="presupuesto">Ejecución Plan de Acción</h1>
<anthem:Label ID="lblMensaje" runat="server"></anthem:Label>
<%--<anthem:Panel ID="pnlGridPlanAccion" AutoUpdateAfterCallBack="true" runat="server">--%>
<div class="borde">
                            <table style="width: 100%;" class="content-box">
                                <tr>
                                    <td style="width: 20%;">Seleccione Vigencia</td>
                                    <td><asp:DropDownList ID="ddlAnosVigencia" runat="server"  OnSelectedIndexChanged="ddlAnosVigencia_SelectedIndexChanged" AutoPostBack="True">
                                        </asp:DropDownList></td>                                
                                    <td>Entidad</td>
                                    <td>
                                        <asp:DropDownList ID="ddlEntidad" runat="server" OnSelectedIndexChanged="ddlEntidad_SelectedIndexChanged" AutoPostBack="True">
                                        </asp:DropDownList></td>
                                </tr>
                                <tr>
                                    <td>Dependencia</td>
                                    <td>
                                        <asp:DropDownList ID="ddlDependencias" runat="server" OnSelectedIndexChanged="ddlDependencias_SelectedIndexChanged1" AutoPostBack="True">
                                        </asp:DropDownList></td>
                                    <td>
                                        Grupo</td>
                                    <td>
                                        <asp:DropDownList ID="ddlGrupos" runat="server" OnSelectedIndexChanged="ddlGrupos_SelectedIndexChanged1" AutoPostBack="True">
                                        </asp:DropDownList></td>
                                </tr>
                            </table>
                            </div>  
                            <anthem:LinkButton ID="lnkConsultaRapidaEPs" runat="server" OnClick="lnkConsultaRapidaEPs_Click"
                                                EnableCallBack="False" CssClass="boton">Consulta Rapida EP</anthem:LinkButton>
    <cc1:msgBox ID="MsgBox1" runat="server" />
                                            <anthem:Panel ID="pnlConsultaRapidaEP" runat="server" AutoUpdateAfterCallBack="True"
                                                Visible="False" Width="100%">
                                                
                                                <table class="tabs">
                                                    <tr>
                                                        <td class="tab-inactivo">
                                                            <anthem:LinkButton ID="lnkEpe" runat="server" CausesValidation="False" EnableCallBack="False"
                                                                Font-Bold="False" Font-Italic="False" Font-Size="Small" Font-Strikeout="False"
                                                                OnClick="lnkEpe_Click" OnClientClick="return confirmEditEP();" Width="93px">EP</anthem:LinkButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </anthem:Panel>
                                            
                                           <div class="overflow bt-space10">
                                            <dxwgv:ASPxGridView ID="gidvAccionEpeDev" runat="server" AutoGenerateColumns="False"
                                                CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue"
                                                KeyFieldName="FAE_ID" OnRowCommand="gidvAccionEpeDev_RowCommand" Width="100%"
                                                Visible="False" OnAutoFilterCellEditorCreate="gidvAccionEpeDev_AutoFilterCellEditorCreate" OnAutoFilterCellEditorInitialize="gidvAccionEpeDev_AutoFilterCellEditorInitialize" OnProcessColumnAutoFilter="gidvAccionEpeDev_ProcessColumnAutoFilter">
                                                <SettingsPager AlwaysShowPager="True" ShowDefaultImages="False">
                                                    <AllButton Text="Todos" Visible="True">
                                                    </AllButton>
                                                    <NextPageButton Text="Siguiente &gt;">
                                                    </NextPageButton>
                                                    <PrevPageButton Text="&lt; Anterior">
                                                    </PrevPageButton>
                                                </SettingsPager>
                                                <Images ImageFolder="~/App_Themes/Plastic Blue/{0}/">
                                                    <CollapsedButton Height="10px" Url="~/App_Themes/Plastic Blue/GridView/gvCollapsedButton.png"
                                                        Width="9px" />
                                                    <ExpandedButton Height="9px" Url="~/App_Themes/Plastic Blue/GridView/gvExpandedButton.png"
                                                        Width="9px" />
                                                    <HeaderSortDown Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortDown.png"
                                                        Width="11px" />
                                                    <HeaderSortUp Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortUp.png"
                                                        Width="11px" />
                                                </Images>
                                                <Styles CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue">
                                                    <Header ImageSpacing="10px" SortingImageSpacing="10px">
                                                    </Header>
                                                    <SelectedRow BackColor="Maroon">
                                                    </SelectedRow>
                                                </Styles>
                                                <Columns>
                                                    <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Width="20px">
                                                        <ClearFilterButton Visible="True">
                                                        </ClearFilterButton>
                                                    </dxwgv:GridViewCommandColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="FAE_ID" FieldName="FAE_ID" Visible="False"
                                                        VisibleIndex="1">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Objeto" FieldName="FAE_OBJETO" VisibleIndex="1"
                                                        Width="350px">
                                                        <EditCellStyle Wrap="True">
                                                        </EditCellStyle>
                                                        <FilterCellStyle Wrap="True">
                                                        </FilterCellStyle>
                                                        <EditFormCaptionStyle Wrap="True">
                                                        </EditFormCaptionStyle>
                                                        <HeaderStyle Wrap="True" />
                                                        <CellStyle Wrap="True">
                                                        </CellStyle>
                                                        <FooterCellStyle Wrap="True">
                                                        </FooterCellStyle>
                                                        <GroupFooterCellStyle Wrap="True">
                                                        </GroupFooterCellStyle>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Numero EP" FieldName="FAE_NUMEROEPE" VisibleIndex="2"
                                                        Width="40px">
                                                        <Settings SortMode="Value" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                     <dxwgv:GridViewDataHyperLinkColumn Caption="HISTORICO" FieldName="HISTORICO" 
                            VisibleIndex="4" Width="100px">
                            <DataItemTemplate>
                                <table>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="lnkEjecucion" runat="server" Visible='<%# Convert.ToInt32(Eval("HISTORICO")) > 0 ?   true :  false%>'
                                                CommandName="cmdHistorico">Ver Histórico</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </DataItemTemplate>
                        </dxwgv:GridViewDataHyperLinkColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Valor EP" FieldName="FAE_VALOR_EPE" VisibleIndex="3"
                                                        Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N0}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Estado" FieldName="TPE_NOMBRE" VisibleIndex="5"
                                                        Width="100px">
                                                        <Settings AutoFilterCondition="Contains" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="N&#250;mero CDP" FieldName="FAE_NUMERO_CDP"
                                                        VisibleIndex="6" Width="40px">
                                                        <Settings SortMode="Value" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Fecha CDP" FieldName="FAE_FECHA_CDP" UnboundType="DateTime"
                                                        VisibleIndex="7" Width="80px">
                                                        <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                                        </PropertiesTextEdit>
                                                        <Settings AutoFilterCondition="Contains" GroupInterval="DateRange" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn FieldName="PLN_ID" Visible="False" VisibleIndex="7">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn FieldName="ACC_ID" Visible="False" VisibleIndex="7">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Valor CDP" FieldName="FAE_VALOR_CDP" VisibleIndex="8"
                                                        Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N0}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="N&#250;mero Compromiso" FieldName="CTT_NUMERO_REGISTRO"
                                                        VisibleIndex="9" Width="60px">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Rubro" FieldName="PLN_NOMBRE" VisibleIndex="12"
                                                        Width="150px">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Dependencia" FieldName="DEP_NOMBRE" VisibleIndex="10"
                                                        Width="150px">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Usuario Registra" FieldName="USU_NOMBRE" VisibleIndex="13">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Clasificaci&#243;n" FieldName="CLS_NOMBRE"
                                                        VisibleIndex="11" Width="150px">
                                                    </dxwgv:GridViewDataTextColumn>
                        
                                                </Columns>
                                                <TotalSummary>
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N0}" FieldName="FAE_VALOR_EPE" ShowInColumn="FAE_VALOR_EPE"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N0}" FieldName="FAE_VALOR_CDP" ShowInColumn="FAE_VALOR_CDP"
                                                        SummaryType="Sum" />
                                                        <dxwgv:ASPxSummaryItem DisplayFormat="{0:N0}" FieldName="CTT_VALOR_CONTRATO" ShowInColumn="CTT_VALOR_CONTRATO"
                                                        SummaryType="Sum" />
                                                </TotalSummary>
                                                <SettingsBehavior ColumnResizeMode="Control" />
                                                <Settings ShowFooter="True" ShowFilterRow="True" ShowGroupPanel="True" />
                                                <SettingsCookies Enabled="True" />
                                            </dxwgv:ASPxGridView>
                                           </div>
                                            <dxwgv:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gidvAccionEpeDev">
                                            </dxwgv:ASPxGridViewExporter>
                                            <anthem:Button ID="btnExportToXlsEp" runat="server" EnableCallBack="False" OnClick="Button1_Click"
                                                Text="Exportar a XLS" Visible="False" CssClass="button m" />
                                       
                                  <table width="100%" class="content-box1 bt-space15">
            <tr>
                <td>
                    <h3>
                        Convenciones</h3></td>
                        <td>
                    <anthem:Image ID="Image10" runat="server" ImageUrl="~/Imagenes/ball_red_16.png" CssClass="fl-space" />0%
                    a 33%</td>
                <td>
                    <anthem:Image ID="Image5" runat="server" ImageUrl="~/Imagenes/ball_yellow_16.png"
                        CssClass="fl-space" />33% a 66%</td>
                <td>
                    <anthem:Image ID="Image4" runat="server" ImageUrl="~/Imagenes/ball_green_16.png"
                        CssClass="fl-space" />66% a 100%</td>
                <td class="angulo">
                    &nbsp;</td>
                <td class="gris right"><input id="btnCustWindow" class="button l" onclick="ShowHideCustomizationWindow();"
                                            type="button" value="Mostrar Ventana Manual" />                                   </td>
                </tr>
                                                            
                                                        </table>

                                            <table class="tabs">
                                                <tr>
                                                    <td class="tab-inactivo">
                                                        <anthem:LinkButton ID="lnkAcciones" runat="server" CausesValidation="False" EnableCallBack="False"
                                                            OnClientClick="return confirmEdit();" OnClick="lnkAcciones_Click"
                                                            Font-Italic="False">Actividades</anthem:LinkButton>
                                                    </td>                                                   
                                                    
                                                </tr>
                                            </table>
                                            <div class="overflow">
                                            <dxwgv:ASPxGridView ID="ASPxGridViewDemo" runat="server" AutoGenerateColumns="False"
                                                CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue"
                                                KeyFieldName="PLN_ID" OnHtmlRowPrepared="ASPxGridViewDemo_HtmlRowPrepared" OnRowCommand="ASPxGridViewDemo_RowCommand"
                                                Width="100%">
                                                <Images ImageFolder="~/App_Themes/Plastic Blue/{0}/">
                                                    <ExpandedButton Height="9px" Url="~/App_Themes/Plastic Blue/GridView/gvExpandedButton.png"
                                                        Width="9px">
                                                    </ExpandedButton>
                                                    <CollapsedButton Height="10px" Url="~/App_Themes/Plastic Blue/GridView/gvCollapsedButton.png"
                                                        Width="9px">
                                                    </CollapsedButton>
                                                    <HeaderSortDown Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortDown.png"
                                                        Width="11px">
                                                    </HeaderSortDown>
                                                    <HeaderSortUp Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortUp.png"
                                                        Width="11px">
                                                    </HeaderSortUp>
                                                    <LoadingPanel AlternateText="Cargando">
                                                    </LoadingPanel>
                                                </Images>
                                                <Settings ShowFilterRow="True" ShowFooter="True" ShowGroupFooter="VisibleIfExpanded"
                                                    ShowGroupPanel="True" ShowTitlePanel="True" />
                                                <Styles CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue">
                                                    <Header ImageSpacing="10px" SortingImageSpacing="10px">
                                                    </Header>
                                                    <CustomizationWindow BackColor="#FFFFC0">
                                                    </CustomizationWindow>
                                                    <SelectedRow BackColor="Maroon">
                                                    </SelectedRow>
                                                    <FocusedRow BackColor="White">
                                                    </FocusedRow>
                                                </Styles>
                                                <Columns>
                                                    <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Width="20px">
                                                        <ClearFilterButton Visible="True">
                                                        </ClearFilterButton>
                                                        <CellStyle Wrap="True">
                                                        </CellStyle>
                                                    </dxwgv:GridViewCommandColumn>
                                                    <dxwgv:GridViewDataHyperLinkColumn Caption="Ver" Visible="False" VisibleIndex="1">
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="link" runat="server">Ver</asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxwgv:GridViewDataHyperLinkColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="ID" FieldName="PLN_ID" Visible="False" VisibleIndex="1">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Semaforo" VisibleIndex="1" Width="50px">
                                                        <DataItemTemplate>
                                                            <anthem:Image ID="Image1" runat="server" ImageUrl="Imagenes/Botverde.gif" Visible='<%# Convert.ToDecimal(Eval("PORCENTAJE_EJECUCION_REAL")) > Convert.ToDecimal(Eval("SSE_VALOR_MAX")) ? true:  false %>' />
                                                            <anthem:Image ID="Image2" runat="server" ImageUrl="Imagenes/Botrojo.gif" Visible='<%# Convert.ToDecimal(Eval("PORCENTAJE_EJECUCION_REAL")) <= Convert.ToDecimal(Eval("SSE_VALOR_MED")) ? true:  false %>' />
                                                            <anthem:Image ID="Image3" runat="server" ImageUrl="Imagenes/Botamarillo.gif" Visible='<%# Convert.ToDecimal(Eval("PORCENTAJE_EJECUCION_REAL")) > Convert.ToDecimal(Eval("SSE_VALOR_MED")) && Convert.ToDecimal(Eval("PORCENTAJE_EJECUCION_REAL")) < Convert.ToDecimal(Eval("SSE_VALOR_MAX")) ? true:  false %>' />
                                                        </DataItemTemplate>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Proyecto de inversi&#243;n" FieldName="PLN_NOMBRE"
                                                        VisibleIndex="2" Width="700px">
                                                        <HeaderStyle Wrap="True" />
                                                        <CellStyle Wrap="True">
                                                        </CellStyle>
                                                        <FooterCellStyle Wrap="True">
                                                        </FooterCellStyle>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Dependencia" FieldName="DEP_NOMBRE" VisibleIndex="3"
                                                        Width="200px">
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Valor Apropiaci&#243;n Inicial" FieldName="VALOR_APROPIACION_INICIAL"
                                                        VisibleIndex="5" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Adiciones" FieldName="VALOR_APROPIACION_ADICIONES"
                                                        VisibleIndex="4" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Reducciones" FieldName="VALOR_APROPIACION_REDUCCION"
                                                        VisibleIndex="6" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Desplazamiento" FieldName="VALOR_APROPIACION_DESAPLAZAMIENTO"
                                                        VisibleIndex="7" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Aplazamiento" FieldName="VALOR_APROPIACION_APLAZAMIENTO"
                                                        VisibleIndex="8" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Recortes" FieldName="VALOR_APROPIACION_RECORTE"
                                                        VisibleIndex="9" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Apropiaci&#243;n Final" FieldName="VALOR_APROPIACION_FINAL"
                                                        VisibleIndex="10" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Clasificaci&#243;n del gasto" FieldName="CLS_NOMBRE"
                                                        VisibleIndex="11" Width="110px">
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="C&#243;digo presupuestal" FieldName="PLN_CODIGO_PRESUPUESTAL"
                                                        VisibleIndex="12" Width="100px">
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Total Programado" FieldName="TOTAL_PROGRAMADO"
                                                        VisibleIndex="13" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Descripci&#243;n" FieldName="PLN_DESCRIPCION"
                                                        VisibleIndex="14" Width="100px">
                                                        <CellStyle Wrap="True">
                                                        </CellStyle>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Apropiaci&#243;n con CDP" FieldName="TOTAL_DISPONIBILIDAD_ACUMULADA"
                                                        VisibleIndex="15" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Apropiaci&#243;n sin CDP" FieldName="TOTAL_APROPIACION_SIN_CDP"
                                                        VisibleIndex="16" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Comprometido" FieldName="TOTAL_COMPROMETIDO"
                                                        VisibleIndex="17" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Obligaciones" FieldName="TOTAL_OBLIGACION"
                                                        VisibleIndex="20" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="% Obligaci&#243;n" FieldName="PORCENTAJE_OBLIGACION"
                                                        VisibleIndex="21" Width="100px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="Por Ejecutar" FieldName="TOTAL_POR_EJECUTAR"
                                                        VisibleIndex="18" Width="120px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                    <dxwgv:GridViewDataTextColumn Caption="% Ejecuci&#243;n Real" FieldName="PORCENTAJE_EJECUCION_REAL"
                                                        VisibleIndex="19" Width="100px">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                                        </PropertiesTextEdit>
                                                        <HeaderStyle Wrap="True" />
                                                    </dxwgv:GridViewDataTextColumn>
                                                </Columns>
                                                <TotalSummary>
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="PLN_VALOR_APROPIACION" ShowInGroupFooterColumn="Valor Apropiaci&#243;n"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_PROGRAMADO" ShowInGroupFooterColumn="TOTAL_PROGRAMADO"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_DISPONIBILIDAD_ACUMULADA"
                                                        ShowInGroupFooterColumn="TOTAL_DISPONIBILIDAD_ACUMULADA" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_APROPIACION_SIN_CDP"
                                                        ShowInGroupFooterColumn="TOTAL_APROPIACION_SIN_CDP" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_COMPROMETIDO" ShowInGroupFooterColumn="TOTAL_COMPROMETIDO"
                                                        SummaryType="Sum" />
                                                        <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_OBLIGACION" ShowInGroupFooterColumn="TOTAL_OBLIGACION"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_POR_EJECUTAR" ShowInGroupFooterColumn="TOTAL_POR_EJECUTAR"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_ADICIONES"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_ADICIONES" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_MODIFICACION" ShowInGroupFooterColumn="VALOR_MODIFICACION"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_INICIAL"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_INICIAL" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_REDUCCION"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_REDUCCION" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_DESAPLAZAMIENTO"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_DESAPLAZAMIENTO" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_APLAZAMIENTO"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_APLAZAMIENTO" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_RECORTE"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_RECORTE" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="VALOR_APROPIACION_FINAL"
                                                        ShowInGroupFooterColumn="VALOR_APROPIACION_FINAL" SummaryType="Sum" />
                                                </TotalSummary>
                                                <GroupSummary>
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="PLN_VALOR_APROPIACION" ShowInGroupFooterColumn="Valor Apropiaci&#243;n"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_PROGRAMADO" ShowInGroupFooterColumn="TOTAL_PROGRAMADO"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_DISPONIBILIDAD_ACUMULADA"
                                                        ShowInGroupFooterColumn="TOTAL_DISPONIBILIDAD_ACUMULADA" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_APROPIACION_SIN_CDP"
                                                        ShowInGroupFooterColumn="TOTAL_APROPIACION_SIN_CDP" SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_COMPROMETIDO" ShowInGroupFooterColumn="TOTAL_COMPROMETIDO"
                                                        SummaryType="Sum" />
                                                    <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="TOTAL_POR_EJECUTAR" ShowInGroupFooterColumn="TOTAL_POR_EJECUTAR"
                                                        SummaryType="Sum" />
                                                </GroupSummary>
                                                <SettingsText GroupPanel="Arrastre el encabezado de la columna  aqui para agrupar por columna"
                                                    Title="Ejecuci&#243;n Presupuestal" />
                                                <SettingsPager ShowDefaultImages="False">
                                                    <AllButton Text="Todos" Visible="True">
                                                    </AllButton>
                                                    <NextPageButton Text="Siguiente &gt;">
                                                    </NextPageButton>
                                                    <PrevPageButton Text="&lt; Anterior">
                                                    </PrevPageButton>
                                                </SettingsPager>
                                                <ClientSideEvents EndCallback="function(s, e) {actualizarTotales();}" />
                                                <SettingsCookies Enabled="True" />
                                                <SettingsBehavior ColumnResizeMode="Control" />
                                                <SettingsCustomizationWindow Enabled="True" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="TopSides" />
                                            </dxwgv:ASPxGridView>
                                            </div>
                                            <dxwgv:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ASPxGridViewDemo">
                                            </dxwgv:ASPxGridViewExporter>
    
                                        
                         <%--   </anthem:Panel>--%>
                            
                            <dx:ASPxPopupControl id="PopupPanelMotivoRechazo" runat="server" AllowDragging="True"
                    Height="300px" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                    Width="600px" Text="HISTORICO">
        <contentcollection>
<dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
    &nbsp;<dxwgv:ASPxGridView ID="ASPxGridViewHistorico" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
        CssPostfix="PlasticBlue" AutoGenerateColumns="False">
        <SettingsPager ShowDefaultImages="False">
            <AllButton Text="All">
            </AllButton>
            <NextPageButton Text="Next &gt;">
            </NextPageButton>
            <PrevPageButton Text="&lt; Prev">
            </PrevPageButton>
        </SettingsPager>
        <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
            <Header ImageSpacing="10px" SortingImageSpacing="10px">
            </Header>
        </Styles>
        <StylesEditors>
            <CalendarHeader Spacing="11px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>
        <Columns>
                                                <dxwgv:GridViewDataTextColumn FieldName="FAE_ID" ShowInCustomizationForm="True" VisibleIndex="0" Width="50px">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="FEA_OBSERVACIONES" ShowInCustomizationForm="True"
                                                    VisibleIndex="2" Width="500px">
                                                    <EditCellStyle Wrap="True">
                                                        </EditCellStyle>
                                                        <FilterCellStyle Wrap="True">
                                                        </FilterCellStyle>
                                                        <EditFormCaptionStyle Wrap="True">
                                                        </EditFormCaptionStyle>
                                                        <HeaderStyle Wrap="True" />
                                                        <CellStyle Wrap="True">
                                                        </CellStyle>
                                                        <FooterCellStyle Wrap="True">
                                                        </FooterCellStyle>
                                                        <GroupFooterCellStyle Wrap="True">
                                                        </GroupFooterCellStyle>
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="USU_NOMBRE" ShowInCustomizationForm="True"
                                                    VisibleIndex="1" Width="100px">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="TPE_NOMBRE" ShowInCustomizationForm="True"
                                                    VisibleIndex="3" Width="100px">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="FEA_FECHA" ShowInCustomizationForm="True" VisibleIndex="4" Width="100px">
                                                </dxwgv:GridViewDataTextColumn>
                                            </Columns>
    </dxwgv:ASPxGridView>
</dx:PopupControlContentControl>
</contentcollection>
    </dx:ASPxPopupControl>
                            <asp:Button ID="btnPdfExport" runat="server" Text="Exportar a PDF" OnClick="btnPdfExport_Click" Visible="False" CssClass="button m" />
                            <asp:Button ID="btnXlsExport" runat="server" Text="Exportar a XLS" OnClick="btnXlsExport_Click" CssClass="button m" />
                            <asp:Button ID="btnRtfExport" runat="server" Text="Exportar a RTF" OnClick="btnRtfExport_Click" CssClass="button m" />
                            <asp:Button ID="btnCsvExport" runat="server" Text="Exportar a CSV" OnClick="btnCsvExport_Click" CssClass="button m" />

                            <anthem:Panel ID="pnlTotales" runat="server" AutoUpdateAfterCallBack="true" Visible="false"
                                Width="100%">
                                <table width="100%" class="padding">
                                    <tr>
                                        <td style="width: 20%;">
                                            <table class="content-box1" width="100%">
                                                <tr>
                                                                <td>
                                                                    Total Apropiación Presupestal</td>
                                                                <td>
                                                                    <anthem:TextBox ID="txtTotalApropiacion" runat="server" AutoUpdateAfterCallBack="True"
                                                                        Text="<%=StrValorTotalApropiacion %>"></anthem:TextBox></td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Total Actividades Programadas
                                                                </td>
                                                                <td>
                                                                    <anthem:TextBox ID="txtActividadesProgramadas" runat="server" AutoUpdateAfterCallBack="True"
                                                                        Text="<%=StrValorActividadesProgramadas %>"></anthem:TextBox></td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Saldo Apropiación</td>
                                                                <td>
                                                                    0</td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Total programado</td>
                                                                <td>
                                                                    0</td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Total programado otros recursos</td>
                                                                <td>
                                                                    0</td>
                                                            </tr>
                                                        </table>                                                   
                                        </td>
                                        <td style="width: 20%">
                                            <table  class="content-box1" width="100%">
                                            <tr>
                                                 <td>
                                                                                Total Compromisos</td>
                                                                            <td>
                                                                                0,00</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                Total Recursos Programados del proyecto</td>
                                                                            <td>
                                                                                0,00</td>
                                                                        </tr>
                                                                    </table>
                                         </td>
                                         <td style="width: 20%">
                                                        <table width="100%" class="content-box1">
                                                          <tr>
                                                                            <td>
                                                                                Total CDP</td>
                                                                            <td>
                                                                                0,00</td>
                                                                        </tr>
                                                                    </table>                                                                
                                        </td>
                                        <td style="width: 20%">
                                            <table width="100%" class="content-box1">
                                                <tr>
                                                  <td>
                                                                                Saldo apropiación sin CDP</td>
                                                                            <td>
                                                                                &nbsp;0,00
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                         </td>
                                         <td style="width: 20%">
                                                        <table width="100%" class="content-box1">
                                                            <tr>
                                                               <td>Saldo COP sin comprometer</td>
                                                                            <td>
                                                                                0,00</td>
                                                                        </tr>
                                                                    </table>
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%" class="content-box1">
                                    <tr>
                                        <td align="left" style="width: 15%; height: 43px;">
                                            Funcionamiento</td>
                                        <td align="left">
                                            <asp:TextBox ID="txtFuncionamiento" runat="server" ReadOnly="True">
                                            </asp:TextBox></td>                                        
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            Inversión</td>
                                        <td>
                                            <asp:TextBox ID="txtInversion" runat="server" ReadOnly="True">
                                            </asp:TextBox></td>                                       
                                    </tr>
                                </table>
                            </anthem:Panel>                        
</asp:Content>
